package com.bjpowernode.feign;

//此类的目的是为了远程调用上传文件模块，来实现图片上传功能

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(value = "myfile")
public interface FileService {

    //定义要远程调用上传文件模块的接口（路径为上传文件模块里来实现图片上传功能的controller方法接口）
    @PostMapping(value = "/file/images/upload",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    String imageUpload(MultipartFile file);
}
